<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>flex 动态布局</title>
    <style type="text/css">
      .container {
        display: flex;
        /* flex-flow: row wrap; */
        margin: 0 auto;
        border: black solid;
        width: 500px;
      }

      .wrapper {
        margin: 10px;
        height: 100px;
        background-color: black;
      }
      .wrapper:nth-child(1) {
        /* 动态尺寸: 1:2:3 */
        flex: 1;
      }
      .wrapper:nth-child(2) {
        flex: 2;
      }
      .wrapper:nth-child(3) {
        flex: 4;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="wrapper"></div>
      <div class="wrapper"></div>
      <div class="wrapper"></div>
    </div>
  </body>
</html>
